/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 0
 * Date: 2023-04-25
 * Time: 21:05
 */
public class Test {
    public static void main(String[] args) {
       /* int a = 10;
        if(a % 2 == 0) {
            System.out.println("偶数");
        }else {
            System.out.println("奇数");
        }*/
        /*int year = 2022;
        if(year % 100 != 0) {
            if(year % 4 == 0) {
                System.out.println("是普通闰年！");
            }else {
                System.out.println("不是普通闰年！");
            }
        }else {
            if(year % 400 == 0) {
                System.out.println("是世纪闰年！");
            }else {
                System.out.println("不是世纪闰年！");
            }
        }*/
        /*int a = 10;
        if(a == 20);
        //此时执行这段代码 已经没有条件了
        {
            System.out.println("haha!");
        }*/
        int x = 10;
        int y = 10;
        if (x == 10) {
            if (y == 10) {
                System.out.println("aaa");
            }else {
                System.out.println("bbb");
            }
        }
    }
    public static void main10(String[] args) {
        System.out.println("1");
        System.out.println("3");
        System.out.println("2");
        int a = 10;
        if(a == 1) {
            System.out.println("a==1");
        }else if(a == 5){
            System.out.println("a == 5");
        }else {
            System.out.println("a != 1 && a != 5");
        }

    }
    public static void main9(String[] args) {
       /* int a = 10;
        int b = 20;
        //System.out.println(a = b);//判断相等是两个等号
        //                  true < 5
        System.out.println(a < b != false);
        //                  true  != false
*/
        // System.out.println(10 > 20 || 10 / 0 == 0);
        //System.out.println(10 > 20 & 10 / 0 == 0); // 程序抛出异常
        //System.out.println(10 < 20 | 10 / 0 == 0); // 程序抛出异常

        /*System.out.println(10 < 20 & 1 > 0);
        System.out.println(10 < 20 | 1 > 0);*/

        //位运算符
        /*int a = -1;
        System.out.println(a >>> 1);
*/
        /*int a = 10;
        int b = 20;
        int max = a > b ? a : b;
        System.out.println(max);
        boolean flg2 = true == true ? false : (true == true ? true : false);
        System.out.println(flg2);*/
        int a = 10;
        int b = 20;
        double c = a > b? 1 : 2.0;

        int d = (a + b) * 5;
    }



    public static void main8(String[] args) {
        int a = 10;
        //--a;
        //int b = --a;
        a = a--;//是JAVA自己的处理方式  汇编
        System.out.println(a);
        //10--;
    }

    public static void main7(String[] args) {
        int a = 1;
        a += 1;//a = a + 1
        System.out.println(a);


        int b = 2;
        long l = 10;
        //b = b+l;
        b += l;//帮我们进行类型转换
        System.out.println(b);

    }
}
